{template header}
<script type="text/javascript">
function compare(){
	var docs;
	try{
		document.documentElement.scrollTop=0;
		if($("input[name='eid[]']").length==null){
			alert("{lang editionTip1}");
		}else{
			switch($("input:checked").length){
				case 0:
				alert("{lang editionTip2}");
				break;
				case 1:
				alert("{lang editionTip3}");
				break;
				case 2:
				$("form[name='editionform']").attr('target',"_blank");
				$("form[name='editionform']").attr('action',"index.php?edition-compare");
				$("form[name='editionform']").submit();
				break;
				default:
				alert("{lang editionTip4}");
				break;
			}
		}
	}catch(e){
		alert("{lang editionTip2}");
	}
}
function removedoc(){
	if($("input[name='eid[]']").length==null){
		alert("{lang editionTip1}");
	}else{
		if($("input:checked").length<1){
			alert("{lang editionTip5}");
			return false;
		}
	}
	if(confirm("{lang editionTip6}")==false){
		return false;
	}else{
		$("form[name='editionform']").attr('target',"_self");
		$("form[name='editionform']").attr('action',"index.php?edition-remove");
		$("form[name='editionform']").submit();
	}
}

function excellence(){
	if($("input[name='eid[]']").length==null){
		alert("{lang editionTip1}");
	}else{
		if($("input:checked").length<1){
			alert("{lang editionTip7}");
			return false;
		}
	}
	if(confirm("{lang editionTip8}")==false){
		return false;
	}else{
		$("form[name='editionform']").attr('target',"_self");
		$("form[name='editionform']").attr('action',"index.php?edition-excellent");
		$("form[name='editionform']").submit();
	}
}

function copy(){
	if($("input[name='eid[]']").length==null){
		alert("{lang editionTip1}");
	}else{
		if($("input:checked").length!=1){
			alert("{lang editionTip9}");
			return false;
		}
	}
	if(confirm("{lang editionTip10}")==false){
		return false;
	}else{
		$("form[name='editionform']").attr('target',"_self");
		$("form[name='editionform']").attr('action',"index.php?edition-copy");
		$("form[name='editionform']").submit();
	}	
}
</script>
<div class="hd_map wrap">
	<a href="{WIKI_URL}" target="_blank">{$setting[site_name]}</a> &gt;&gt; <a href="{url doc-view-$doc['did']}">{$doc['title']}</a> &gt;&gt; {lang edtionList}
	</div>

<section class="version wrap bor-ccc">
	<h2 class="col-h2">{$doc['title']}<span class="f14"> < {lang edition}</span></h2><a href="{url doc-view-$doc['did']}" target="_self" class="more">{lang backDoc}</a>
	<form method="post" name="editionform">
	<table cellspacing="0" cellpadding="0" class="table">
		<thead>
		<tr>
			<td style="width: 150px;">{lang edition}</td>
			<td style="width: 100px;">{lang createTime}</td>
			<td style="width: 140px;">{lang editionCreator}</td>
			<td style="width: 70px;">{lang variation}</td>
			<td style="width: 70px;">{lang excellent}</td>
			<td style="width: 70px;">{lang gold}</td>
			<td style="width: 220px;">{lang reason}</td>

		</tr>
		</thead>
		<tbody>
		<!--{loop $editionlist $key $edition}-->
		<tr>
			<td><input name="eid[]" value="{$edition['eid']}" type="checkbox" /><i class="checkbox"></i><input name="editions_{$edition['eid']}" value="{eval echo getCount($editionlist)-$key}" type="hidden" />
			<a href="{url edition-view-{$edition['eid']}-{eval echo getCount($editionlist)-$key}}">{lang edition}{eval echo getCount($editionlist)-$key}</a></></td>
			<td class="gray">{$edition['time']}</td>
			<td><a href="{url user-space-$edition['authorid']}" >{$edition['author']}</a>
			<span title="{lang userstars} {$edition['stars']}"><!--{for $i=0; $i<$edition['editorstar'][3]; $i++}--><img src="style/default/star_level3.gif"/><!--{/for}--><!--{for $i=0; $i<$edition['editorstar'][2]; $i++}--><img src="style/default/star_level2.gif"/><!--{/for}--><!--{for $i=0; $i<$edition['editorstar'][1]; $i++}--><img src="style/default/star_level1.gif"/><!--{/for}--></span>
			</td>
			<td><!--{if $edition['big']==1}-->{lang big}<!--{else}-->{lang little}<!--{/if}--></td>
			<td><!--{if $edition['excellent']==1}--><img src="style/default/excellent.gif"><!--{/if}--></td>
			<td class="orange" ><!--{if $edition['coins']}--><img src="style/default/jb.gif"> <!--{if $edition['coins']>0}-->+<!--{/if}-->{$edition['coins']}<!--{/if}--></td>
			<td>{$edition['reason']}</td>
		</tr>
		<!--{/loop}-->
		</tbody>
	</table><input type="hidden" value="{$doc['did']}" name="did"/>

<div class="operation_btn">	
	<input type="button" onclick="compare();" value="{lang compare}" class="btn_inp"/>
	<!--{if $checkable['remove']}--><input type="button" onclick="removedoc();" value="{lang remove}" class="btn_inp"/><!--{/if}-->	
	<!--{if $checkable['excellent']}--><input type="button" onclick="excellence();" value="{lang excellent}" class="btn_inp"/><!--{/if}-->
	<!--{if $checkable['copy']}--><input type="button" onclick="copy();" value="{lang copy}" class="btn_inp"/><!--{/if}-->
</div>
</form>
</section>



<div class="c-b"></div>
{template footer}

